import request from '@/utils/request'

// 查询清洗报告分页
export const getCleaningReportPageApi = (params) =>
  request.get('pes-microservice-biz/pes/cleaning/report/page', {
    params
  })

// 新增清洗报告
export const addCleaningReportApi = (data) =>
  request.post('pes-microservice-biz/pes/cleaning/report/add', data)

// 更新清洗报告
export const updateCleaningReportApi = (data) =>
  request.post('pes-microservice-biz/pes/cleaning/report/update', data)

// 删除清洗报告
export const deleteCleaningReportApi = (params) =>
  request.post('pes-microservice-biz/pes/cleaning/report/delete', null, {
    params
  })

// 查看某个清洗报告
export const getCleaningReportDetailApi = (params) =>
  request.get('pes-microservice-biz/pes/cleaning/report/one/view', {
    params
  })

// 生成数据
export const generateDataApi = (params) =>
  request.get('pes-microservice-biz/pes/cleaning/report/generate/data', {
    params
  })

// 生成PDF
export const createPdfApi = (data) =>
  request.post(
    'pes-microservice-biz/pes/cleaning/report/report/createPdf',
    data
  )

// 下载PDF
export const downloadPdfApi = (params) =>
  request.post('pes-microservice-biz/pes/cleaning/report/download/pdf', null, {
    params
  })
